﻿/**
* ...
* @author Exey Panteleev
*/
package  {
	import org.papervision3d.core.geom.renderables.Vertex3D;
	import org.papervision3d.core.geom.renderables.Line3D;

	public class Branch {
		
		public var lineVertex1:Vertex3D;
		public var lineVertex2:Vertex3D;
		public var startX:int;
		public var startY:int;
		public var startZ:int;
		public var endX:int;
		public var endY:int;
		public var endZ:int;
		
		public var growing:Boolean = false;
		public var grown:Boolean = false;
		public var readyForGrowing:Boolean = false;
		public var line:Line3D;
		
		public var level:int = 0;
		public var growingTime:Number;
		
		public function Branch(x:int, y:int, z:int, ex:int, ey:int, ez:int):void {
			this.startX = x;
			this.startY = y;
			this.startZ = z;
			this.endX = ex;
			this.endY = ey;
			this.endZ = ez;
			lineVertex1 = new Vertex3D(x, y, z);
			lineVertex2 = new Vertex3D(x, y, z);
		}
		
		
		public function finishGrowing():void {
			grown = true;
			growing = false;
		}
		
	}
	
}